<?php
require_once dirname(__FILE__).'/../lib/RightMenuHelper.class.php';

class rightMenuWidgetComponents extends myComponents{

	/*
	 active elements
	 news items
	 *
	 */
	public function executeRender(){

		$this->helper = $this->getHelper();
		$this->sections = $this->getMenuItemsQuery()->execute();

	}

	public function getMenuItemsQuery(){

		return Doctrine::getTable('Structure')->createQuery('structure')
				->from('Structure s')
				->where('s.parameter = ?', 'section')
				->andWhere('s.lang = ?',$this->getRoute()->getObject()->getLang())
				->andWhere('s.isHidden = ?', false);


	}


	public function getHelper(){
		return new RightMenuHelper();
	}
}